package com.lanxiao.cloud.modules.gateway.route.controller.dubbo;

import com.lanxiao.cloud.gateway.api.GatewayRouteDubboApi;
import com.lanxiao.cloud.gateway.api.dto.GatewayRouteDubboDto;
import com.lanxiao.cloud.modules.gateway.route.application.GatewayRouteQueryManager;
import java.util.List;
import org.apache.dubbo.config.annotation.DubboService;

/**
 * @author ：qiaoliang
 * @date ：2021-09-08
 */
@DubboService
public class GatewayRouteDubboController implements GatewayRouteDubboApi {

  private final GatewayRouteQueryManager gatewayRouteQueryManager;

  public GatewayRouteDubboController(
      GatewayRouteQueryManager gatewayRouteQueryManager) {
    this.gatewayRouteQueryManager = gatewayRouteQueryManager;
  }

  @Override
  public List<GatewayRouteDubboDto> all() {
    return gatewayRouteQueryManager.queryAll();
  }

}
